home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / share / 04 / setup.exe / MM6.Cab / F4175_CSScriptLib.js.F6A680DD_F3FB_4CF3_BABB_0D0F06E630F5 < prev    next >
Encoding:
Text File  |  2000-08-06  |  2.2 KB  |  71 lines

  1. // -- Adobe GoLive JavaScript Library
  2. // -- Global Functions
  3.  
  4. function CSScriptInit() {
  5. if(typeof(skipPage) != "undefined") { if(skipPage) return; }
  6. idxArray = new Array;
  7. for(var i=0;i<CSInit.length;i++)
  8.     idxArray[i] = i;
  9. CSAction2(CSInit, idxArray);
  10.  
  11. }
  12. CSInit = new Array;
  13. CSExit = new Array;
  14. CSStopExecution = false;
  15. function CSAction(array) { 
  16.     return CSAction2(CSAct, array);
  17. }
  18. function CSAction2(fct, array) { 
  19.     var result;
  20.     for (var i=0;i<array.length;i++) {
  21.         if(CSStopExecution) return false; 
  22.         var actArray = fct[array[i]];
  23.         if(actArray == null) return false; 
  24.         var tempArray = new Array;
  25.         for(var j=1;j<actArray.length;j++) {
  26.             if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
  27.                 if(actArray[j][0] == "VAR") {
  28.                     tempArray[j] = CSStateArray[actArray[j][1]];
  29.                 }
  30.                 else {
  31.                     if(actArray[j][0] == "ACT") {
  32.                         tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
  33.                     }
  34.                 else
  35.                     tempArray[j] = actArray[j];
  36.                 }
  37.             }
  38.             else
  39.                 tempArray[j] = actArray[j];
  40.         }            
  41.         result = actArray[0](tempArray);
  42.     }
  43.     return result;
  44. }
  45. CSAct = new Object;
  46. function CSClickReturn () {
  47.     var bAgent = window.navigator.userAgent; 
  48.     var bAppName = window.navigator.appName;
  49.     if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
  50.         return true; // dont follow link
  51.     else return false; // dont follow link
  52. }
  53.  
  54. // -- Action Functions
  55. function CSFixFct() {
  56.     var d = document; var w = window;
  57.     if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) {
  58.         d.location = d.location; }
  59. }
  60. function CSNSFix(action) { 
  61.     var d = document; var w = window;
  62.     if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
  63.         if (typeof d.cs == 'undefined') { 
  64.             d.cs = new Object;
  65.             d.cs.csFix = new Object; 
  66.         } else if (CSIsFrame (w) == true) CSFixFct();
  67.         d.cs.csFix.w = w.innerWidth;
  68.         d.cs.csFix.h = w.innerHeight; 
  69.         window.onresize = CSFixFct;
  70.       }
  71. }
  72. function CSIsFrame (window) {
  73.     var rootWindow = window.parent;
  74.     if (rootWindow == 'undefined') return false;
  75.     for (i = 0; i < rootWindow.frames.length; i++)
  76.         if (window == rootWindow.frames[i]) return true;
  77.     return false;
  78. }
  79.  
  80.  
  81. // EOF
  82.